<?php
include 'checkLogin.php';

@$id = $_REQUEST['id'];
@$statusType= $_REQUEST['statusType'];

@$sellStatus = $_REQUEST['sellStatus'];
@$basicStatus = $_REQUEST['basicStatus'];

include 'db/li.php';

if(!empty($sellStatus)){
	@$flog = dbUpdate("update goods set sellStatus='$sellStatus' where id=:id",array('id'=>$id));
	seccess($flog);
}
if(!empty($basicStatus)){
	@$flog = dbUpdate("update goods set basicStatus='$basicStatus' where id=:id",array('id'=>$id));
	seccess($flog);
}
function seccess($flog){
	if(!$flog){
		$mes = '修改失败';
		include 'updateStatus.php';
		die;
	}
	$mes = '修改成功';
	header('Refresh:0;url=goodsList.php?listType=status');
}
